/*****************************************************************************
  Copyright ?2002-2004 by Martin Cook. All rights are reserved. If you like
  this code then feel free to go ahead and use it. The only thing I ask is 
  that you don't remove or alter my copyright notice. Your use of this 
  software is entirely at your own risk. I make no claims about the 
  reliability or fitness of this code for any particular purpose. If you 
  make changes or additions to this code then please clearly mark your code 
  as yours. If you have questions or comments then please contact me at: 
  martin@codegator.com
  
  Have Fun! :o)
*****************************************************************************/


using System;
using System.Data;

namespace CG.Security.Data
{

	/// <summary>
	/// Data access operations for associations between roles and rights.
	/// </summary>
	public interface IRoleRightData
	{
	
		/// <summary>
		/// Creates a new association between a role and a right.
		/// </summary>
		/// <param name="roleID">The identifier for the role.</param>
		/// <param name="rightID">The identifier for the right.</param>
		void Create(
			int roleID,
			int rightID
			);

		// ******************************************************************

		/// <summary>
		/// Deletes an association between a role and a right.
		/// </summary>
		/// <param name="roleID">The identifier for the role.</param>
		/// <param name="rightID">The identifier for the right.</param>
		void Delete(
			int roleID,
			int rightID
			);

		// ******************************************************************

		/// <summary>
		/// Returns all the roles that are associated with a specified right.
		/// </summary>
		/// <param name="rightID">The identifier for the right.</param>
		/// <returns>A DataSet containing all the roles associated with the 
		/// specified right.</returns>
		System.Data.DataSet FindByRight(
			int rightID
			);

		// ******************************************************************

		/// <summary>
		/// Returns all the rights that are associated with a specified role.
		/// </summary>
		/// <param name="rightID">The identifier for the role.</param>
		/// <returns>A DataSet containing all the rights associated with the 
		/// specified role.</returns>
		System.Data.DataSet FindByRole(
			int roleID
			);

	} // End IRoleRightData

} // End namespace CG.Security.Data

